SendCommand


Prototype:

SendCommand("BindingObjectLabel","Menu ID a,b[,c]")

 

Description:

Send a menu command to the Binding Object.

Parameters are the Menu ID (Zero based)

: a,b[,c]

For example 0,1 means submenu 0 (first submenu - usually File) and 1 means item 1 on that submenu (second item - usually Open), In case of nested submenus use the third parameter c.

 

NOTE: You need to count also separators!

 

Example of usage:

To send string to the object (here Notepad), we can use MMB command - Clipboard. First, we send the string to the clipboard, and then we invoke Select All and after that Paste command in the Binding Object. Click the Send Text button. See the script below:

** Win9x example

C$ = 'Hello from MMB!'

Clipboard("SEND","C$")

** Select all

SendCommand("Binder","1,7")

** Paste

SendCommand("Binder","1,4")

 

** WinXP example

C$ = 'Hello from MMB!'

Clipboard("SEND","C$")

** Select all

SendCommand("Binder","1,13")

** Paste

SendCommand("Binder","1,5")